package com.ruoyi.controller;

import com.ruoyi.common.result.Result;
import com.ruoyi.service.CountService;
import com.ruoyi.service.IT06Service;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

@RestController
@RequestMapping("/count")
@Api(tags = "统计模块")
public class CountController {

    @Autowired
    private CountService countService;

    @PostMapping(value = "/dataAnly")
    @ApiOperation(value = "总量数据统计")
    public Result dataAnly(@RequestBody Map<String,Object> map, HttpServletRequest request){
        return countService.dataAnly(map,request);
    }

    @ApiOperation(value = "用户活跃分析")
    @PostMapping(value = "/userActiveAnalysis")
    public Result userActiveAnalysis(@RequestBody Map<String,Object> map, HttpServletRequest request){
        return countService.userActiveAnalysis(map,request);
    }
    @ApiOperation(value = "部门活跃分析")
    @PostMapping(value = "/depActiveAnalysis")
    public Result depActiveAnalysis(@RequestBody Map<String,Object> map, HttpServletRequest request) {
        return countService.depActiveAnalysis(map, request);
    }
    @ApiOperation(value = "低质量用户分析")
    @PostMapping(value = "/highQualityUserActiveAnalysis")
    public Result highQualityUserActiveAnalysis(@RequestBody Map<String,Object> map, HttpServletRequest request) {
        return countService.highQualityUserActiveAnalysis(map, request);
    }
}
